﻿
/**
 * pixSWX is SWXformat API for pixLib
 *  
 * Copyright © 2007 Laurent Deketelaere, Aral Balkan, Francis Bourre
 * Part of the SWX (SWF Data Exchange Format) project. http://swxformat.org
 * Part of the pixLib project. http://pixlib.org
 *
 * Released under the open source MIT license.
 * http://opensource.org/licenses/mit-license.php
 */
class org.triptyk.pixswx.SWXConnection{
	public static var DEFAULT_CLIP_NAME : String = "__SWXConnectionManager__";
	public static var DEFAULT_CLIP_DEPTH : Number = 65536;

	private static var _oI : SWXConnection;	private static var _nI : Number = 0;

	private var _mcHolder : MovieClip = null;
		public static function getInstance( Void ) : SWXConnection 
	{
		if (!_oI) _oI = new SWXConnection();
		return _oI;
	}

	private function SWXConnection( Void )	{		_mcHolder = _level0.createEmptyMovieClip(DEFAULT_CLIP_NAME, DEFAULT_CLIP_DEPTH);	}

	public function getConnexion( Void ) : MovieClip
	{
		_nI++;
		return _mcHolder.createEmptyMovieClip("holder_" + _nI, _nI);
	}
}